import pytest
from appium import webdriver
import time
@pytest.fixture(scope="function")
def driver():
    dis = {
        "platformName": "Android",
        "appium:platformVersion": "9",
        "appium:appPackage": "com.tal.kaoyan",
        "appium:appActivity": ".ui.activity.SplashActivity",
        "appium:deviceName": "emulator-5554",
        "appium:automationName": "UIAutomator2",
        "appium:noReset": False,
        "newCommandTimeout": "3000"
    }
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', dis)
    yield driver
    time.sleep(10)
    driver.quit()

